package com.yoomiito.app.adapter.my


import android.graphics.Color
import android.text.TextUtils
import android.widget.ImageView
import android.widget.TextView
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.BaseViewHolder
import com.yoomiito.app.R
import com.yoomiito.app.model.my.ApplyInfo
import com.yoomiito.app.model.my.IncomeInfo
import com.yoomiito.app.utils.ImageLoader

class MyIncome2Adapter(var type: Int) :
    BaseQuickAdapter<IncomeInfo, BaseViewHolder>(R.layout.item_income2) {
    override fun convert(helper: BaseViewHolder, item: IncomeInfo) {
        if (TextUtils.isEmpty(item.month)) {
            helper.setText(R.id.item_goods_order_id, item.date)
        } else {
            helper.setText(R.id.item_goods_order_id, item.month)

        }
        helper.setText(R.id.item_money, item.money)
        helper.setVisible(R.id.iv_arrow, type != 4 && type !=3 )

        helper.setText(R.id.item_goods_order_status, "(" + item.statusStr + ")")
        if (item.statusStr.equals("已结算")) {
            helper.setTextColor(R.id.item_goods_order_status, Color.parseColor("#333333"))
        } else {
            helper.setTextColor(R.id.item_goods_order_status, Color.parseColor("#FC873A"))
        }

    }


}
